<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/jsp/admin/includes/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>编辑积分设置</title>
		<%@ include file="/WEB-INF/view/jsp/admin/includes/meta.jsp"%>
		<link type="text/css" rel="stylesheet" href="${ctx}/admin/css/admin.css" />
	</head>

	<body>
		<div class="container">
			<h3>
				编辑积分设置
			</h3>
			<form id="inputForm" name="inputForm"
				action="${ctx}/admin/creditRuleAmount!save.do" method="post">
				<input type="hidden" name="id" value="${creditRuleAmount.id}" />
				<table class="inputView">
					<tr>
						<td class="label" width="15%" align="right" valign="middle">
							积分规则：
						</td>
						<td class="value" valign="middle">
							<select id="creditRuleId" name="creditRuleId">
								<c:forEach items="${creditRuleList}" var="creditRule">
									<option value="${creditRule.id }"
									<c:if test="${creditRule.id==creditRuleAmount.creditRule.id }">selected="selected"</c:if>
									>${creditRule.name }</option>
								</c:forEach>
							</select>
						</td>
						<td>
							<div id="typeTip" style="width: 250px"></div>
						</td>
					</tr>
					
					<tr>
						<td class="label" width="15%" align="right" valign="middle">
							积分类型：
						</td>
						<td class="value" valign="middle">
							<select id="creditTypeId" name="creditTypeId" >
								<c:forEach items="${creditTypeList}" var="creditType">
									<option value="${creditType.id }" 
									<c:if test="${creditType.id==creditRuleAmount.creditType.id }">selected="selected"</c:if>
									>${creditType.name }</option>
								</c:forEach>
							</select>
						</td>
						<td>
							<div id="typeTip" style="width: 250px"></div>
						</td>
					</tr>
					
					<tr>
						<td class="label" width="15%" align="right" valign="middle">
							积分值：
						</td>
						<td class="value" valign="middle">
							<input type="text" id="amout" name="amout" style="width: 180px;"
								value="${creditRuleAmount.amout}" />
						</td>
						<td>
							<div id="typeTip" style="width: 250px"></div>
						</td>
					</tr>
					
					<tr>
						<td class="label" width="15%" align="right" valign="middle">
						</td>
						<td class="value" valign="middle">
							<input type="submit" id="submitConfig" name="submitConfig"
								value="确认" />
							&nbsp;
							<input type="button" value="取消" onclick="history.back()" />
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>
